<?php defined('SYSPATH') or die('No direct access allowed.');
/**
 * 
 * 优酷分类数据导入
 * @author zhangliutao
 * @version 1.0
 */
class Controller_aikan extends Controller_Spider
{
	public function action_index()
	{
		$file_url = "http://www.youku.com/v_olist/c_97.html";
		//$file_url = "http://tudou.com";
		$data = Spider::curl($file_url);
		$match = preg_replace('/http:\/\/www.youku.com\//i','http://tv.cn/',$data);
		//preg_match_all('/<div class="headerBox">(.*)<!--headerBox end-->/is',$data,$match);
		$match = preg_replace('/<script type="text\/javascript" src="([^<>]*).js"><\/script>/is',' ',$match);
		$match = preg_replace('/<script type="text\/javascript">([^<>]*)<\/script>/is',' ',$match);
		$match = preg_replace('/<div class="headerBox">(.*)<!--headerBox end-->/is','',$match);
		$match = preg_replace('/<div class="footerBox">(.*)<!--footeBox end-->/is','',$match);
		$match = preg_replace('/<div id="browse_popularize" class="popularize">(.*)<div class="s_body">/is','<div class="s_body">',$match);
		$match = preg_replace('/<div class="box_border cooperation">(.*)<!--center end-->/is','</div>',$match);
		echo $match;
	}
}
?>